import request from '@/utils/request'

// 点位列表
export function getPoints(params) {
  return request({
    url: '/vm-service/node/search',
    method: 'get',
    params
  })
}
// 点位区域
export function areatPoints(params) {
  return request({
    url: '/vm-service/node/search',
    method: 'get',
    params
  })
}

// 商圈列表
export function getBusinessType() {
  return request({
    url: 'vm-service/businessType',
    method: 'get'
  })
}
// 新增点位
export function addPoints(data) {
  return request({
    url: '/vm-service/node',
    method: 'post',
    data
  })
}
// 修改点位
export function updatePoints(id, data) {
  return request({
    url: '/vm-service/node/' + id,
    method: 'put',
    data
  })
}
// 点位详情
export function detailPoints(id, params) {
  return request({
    url: '/vm-service/node/vmList/' + id,
    method: 'get',
    params
  })
}
// 删除点位
export function deletePoints(id) {
  return request({
    url: '/vm-service/node/' + id,
    method: 'delete'
  })
}
